#include "department.h"
#include <string.h>
using namespace MAN;
using namespace std;

Department::Department(void)
{

}
Department::Department(const char* strname,int m_id)
{
	strcpy(m_strName,strname);
	m_nId = m_id;
}

Department::Department(const char* strname,int m_id,vector<Employee> m_vec)
{
	strcpy(m_strName,strname);
	m_nId = m_id;
	m_vecEmps = m_vec;
}
Department::Department(const Department &that)
{
	strcpy(m_strName,that.m_strName);
	m_nId = that.m_nId;
	m_vecEmps = that.m_vecEmps;
}
//删除本部门的员工。根据从参数传入的员工ID号，从m_vecEmps容器中删除相应员工，没找到则返回false
bool Department::deleteEmp(int id)
{
	return true;

}

//列出本部门的员工。遍历m_vecEmps容器，将本部门的每位员工逐一加入从参数传入的员工容器 
void Department::listEmp(vector<Employee> & vec_emp)
{

}	

//修改本部门的员工信息。根据从参数传入的员工对象的ID号属性，从m_vecEmps容器中找到相应员工，更新其信息，没找到则返回false	
bool Department::modifyEmp(int id)
{
	return true;

}

namespace MAN
{
	std::ostream& operator << (std::ostream& os,Department& d)
	{
	    return os<< d.m_strName << endl;
	}
}
Department::~Department()
{

}